
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>瞬达快递支付页面</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul, ol {
            list-style: none;
        }

        body {
            font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande",
            sans-serif;
        }

        .tab-head {
            margin-left: 120px;
            margin-bottom: 10px;
        }

        .tab-content {
            clear: left;
            display: none;
        }

        h2 {
            border-bottom: solid #02aaf1 2px;
            width: 200px;
            height: 25px;
            margin: 0;
            float: left;
            text-align: center;
            font-size: 16px;
        }

        .selected {
            color: #FFFFFF;
            background-color: #02aaf1;
        }

        .show {
            clear: left;
            display: block;
        }

        .hidden {
            display: none;
        }

        .new-btn-login-sp {
            padding: 1px;
            display: inline-block;
            width: 75%;
        }

        .new-btn-login {
            background-color: #02aaf1;
            color: #FFFFFF;
            font-weight: bold;
            border: none;
            width: 100%;
            height: 30px;
            border-radius: 5px;
            font-size: 16px;
        }

        #main {
            width: 100%;
            margin: 0 auto;
            font-size: 14px;
        }

        .red-star {
            color: #f00;
            width: 10px;
            display: inline-block;
        }

        .null-star {
            color: #fff;
        }

        .content {
            margin-top: 5px;
        }

        .content dt {
            width: 100px;
            display: inline-block;
            float: left;
            margin-left: 20px;
            color: #666;
            font-size: 13px;
            margin-top: 8px;
        }

        .content dd {
            margin-left: 120px;
            margin-bottom: 5px;
        }

        .content dd input {
            width: 85%;
            height: 28px;
            border: 0;
            -webkit-border-radius: 0;
            -webkit-appearance: none;
        }

        #foot {
            margin-top: 10px;
            position: absolute;
            bottom: 15px;
            width: 100%;
        }

        .foot-ul {
            width: 100%;
        }

        .foot-ul li {
            width: 100%;
            text-align: center;
            color: #666;
        }

        .note-help {
            color: #999999;
            font-size: 12px;
            line-height: 130%;
            margin-top: 5px;
            width: 100%;
            display: block;
        }

        #btn-dd {
            margin: 20px;
            text-align: center;
        }

        .foot-ul {
            width: 100%;
        }

        .one_line {
            display: block;
            height: 1px;
            border: 0;
            border-top: 1px solid #eeeeee;
            width: 100%;
            margin-left: 20px;
        }

        .am-header {
            display: -webkit-box;
            display: -ms-flexbox;

            width: 100%;
            position: relative;
            padding: 7px 0;
            -webkit-box-sizing: border-box;
            -ms-box-sizing: border-box;
            box-sizing: border-box;
            background: #1D222D;
            height: 50px;
            text-align: center;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            box-pack: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            box-align: center;
        }

        .am-header h1 {
            -webkit-box-flex: 1;
            -ms-flex: 1;
            box-flex: 1;
            line-height: 18px;
            text-align: center;
            font-size: 18px;
            font-weight: 300;
            color: #fff;
        }
    </style>
</head>
<body text=#000000 bgColor="#ffffff" leftMargin=0 topMargin=4>
<header class="am-header">
    <h1>支付宝体验入口页</h1>
</header>
<script src="../../configure.js">
    
</script>
<script>
    let urlAll = url + "/courier/userPay";
</script>
<div id="main">
    <div id="tabhead" class="tab-head">
        <h2 id="tab1" class="selected" name="tab">付 款</h2>

    </div>
    <form name=alipayment action= http://localhost:8080/sdkd/courier/userPay method=post
          target="_blank">
        <div id="body1" class="show" name="divcontent">
            <dl class="content">
                <dt>商户订单号 ：</dt>
                <dd>
                    <input readonly id="WIDout_trade_no" name="WIDout_trade_no" />
                </dd>
                <hr class="one_line">
                <dt>订单名称 ：</dt>
                <dd>
                    <input readonly id="WIDsubject" name="WIDsubject" />
                </dd>
                <hr class="one_line">
                <dt>付款金额 ：</dt>
                <dd>
                    <input readonly id="WIDtotal_amount" name="WIDtotal_amount" />
                </dd>
                <hr class="one_line">
                <dt>商品描述：</dt>
                <dd>
                    <input readonly id="WIDbody" name="WIDbody" />
                </dd>
                <hr class="one_line">
                <dt></dt>
                <dd id="btn-dd">
						<span class="new-btn-login-sp">
							<button class="new-btn-login" type="submit"
                                    style="text-align: center;">付 款</button>
						</span> <span class="note-help">如果您点击“付款”按钮，即表示您同意该次的执行操作。</span>
                </dd>
            </dl>
        </div>
    </form>

    <div id="foot">
        <ul class="foot-ul">
            <li>版权所有 2015-2018</li>
        </ul>
    </div>
</div>
</body>
<script src="../js/jquery-3.3.1.min.js"></script>
<script language="javascript">
UrlParam = function() { // url参数
            var data, index;    
            (function init() {    
              data = [];    //值，如[["1","2"],["zhangsan"],["lisi"]]
              index = {};   //键:索引，如{a:0,b:1,c:2}
              var u = window.location.search.substr(1);    
              if (u != '') {    
                var params = decodeURIComponent(u).split('&');
                for (var i = 0, len = params.length; i < len; i++) {
                  if (params[i] != '') {
                    var p = params[i].split("=");
                    if (p.length == 1 || (p.length == 2 && p[1] == '')) {// p | p= | =
                      data.push(['']);    
                      index[p[0]] = data.length - 1;    
                    } else if (typeof(p[0]) == 'undefined' || p[0] == '') { // =c 舍弃
                      continue;
                    } else if (typeof(index[p[0]]) == 'undefined') { // c=aaa    
                      data.push([p[1]]);    
                      index[p[0]] = data.length - 1;    
                    } else {// c=aaa    
                      data[index[p[0]]].push(p[1]);    
                    }    
                  }    
                }    
              }    
            })();    
            return {    
              // 获得参数,类似request.getParameter()    
              param : function(o) { // o: 参数名或者参数次序
                try {    
                  return (typeof(o) == 'number' ? data[o][0] : data[index[o]][0]);    
                } catch (e) {    
                }    
              },    
              //获得参数组, 类似request.getParameterValues()    
              paramValues : function(o) { //  o: 参数名或者参数次序
                try {    
                  return (typeof(o) == 'number' ? data[o] : data[index[o]]);    
                } catch (e) {}    
              },    
              //是否含有paramName参数
              hasParam : function(paramName) {
                return typeof(paramName) == 'string' ? typeof(index[paramName]) != 'undefined' : false;
              },    
              // 获得参数Map ,类似request.getParameterMap()    
              paramMap : function() {
                var map = {};    
                try {    
                  for (var p in index) {  map[p] = data[index[p]];  }    
                } catch (e) {}    
                return map;    
              }    
            }    
          }();

        

        let pageId = UrlParam.param("pageId");
        let weight = UrlParam.param("weight");
        let pageNum = UrlParam.param("pageNum");
        let sendName = UrlParam.param("sendName");
        let sendPhone = UrlParam.param("sendPhone");
        let sendAdress = UrlParam.param("sendAdress");
        let status = UrlParam.param("status");
        let money = UrlParam.param("money");

        console.log(pageNum);
        console.log(pageId);

        $('#WIDout_trade_no').attr('value',pageNum+"X"+pageId)
        $('#WIDsubject').attr('value',sendName)
        $('#WIDtotal_amount').attr('value',money)
        $('#WIDbody').attr('value',"快递重量:"+weight+",联系方式:"+sendPhone)
    // function GetDateNow() {
    //     var vNow = new Date();
    //     var sNow = "";
    //     sNow += String(vNow.getFullYear());
    //     sNow += String(vNow.getMonth() + 1);
    //     sNow += String(vNow.getDate());
    //     sNow += String(vNow.getHours());
    //     sNow += String(vNow.getMinutes());
    //     sNow += String(vNow.getSeconds());
    //     sNow += String(vNow.getMilliseconds());
    //     document.getElementById("WIDout_trade_no").value =  sNow;
    //     document.getElementById("WIDsubject").value = "测试";
    //     document.getElementById("WIDtotal_amount").value = "0.01";
    // }
    // GetDateNow();
</script>
</html>